package Exercise;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class exercise6 {
	public static void main(String[] args) {
        String str = "java woaijava,i liek jajavava,i enjoy java";
        String result = removeAllJava(str);
        System.out.println(result);
    }

    public static String removeAllJava(String str) {
        Pattern p = Pattern.compile("java");
        Matcher m = p.matcher(str);
        if (m.find()) {
            str = m.replaceAll("");
            return removeAllJava(str);
        } else {
            return str;
        }
    }
}
